<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<style>
</style>

<body>

    <div style="font-size:20px">点击字体，放大</div>
    <script>
        let d = document.querySelector('div');
        d.onclick = function(){
            let valuefont = parseInt(d.style.fontSize);
            valuefont +=10;
            d.style.fontSize = valuefont +"px";
        }
    </script>
</body>

</html>